#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
const int N = 1e3 + 10;
int n;
double d;
struct node
{
    double l;
    double r;
}a[N];
bool cmp(node& s1, node& s2)
{
    return s1.l < s2.l;
}
int main()
{
    int cnt = 0;
    while (cin >> n >> d, n && d)
    {
        cnt++;
        int flag = 0;
        for (int i = 1; i <= n; i++)
        {
            double x, y;
            cin >> x >> y;
            double s = sqrt(d * d - y * y);
            double left = x - s;
            double right = x + s;
            a[i].l = left;
            a[i].r = right;
            if (y > d)
            {
                flag = 1;
            }
        }
        cout << "Case" << " " << cnt << ":" << " ";
        if (flag)
        {
            cout << -1 << endl;
        }
        else
        {
            sort(a + 1, a + 1 + n, cmp);
            int ret = 1;
            double r = a[1].r;
            for (int i = 2; i <= n; i++)
            {
                double left = a[i].l;
                double right = a[i].r;
                if (r >= left)
                {
                    r = min(r, right);
                }
                else
                {
                    ret++;
                    r = right;
                }
            }
            cout << ret << endl;
        }

    }

    return 0;
}